package com.wuzhiming.istudy.mapper;

import com.wuzhiming.istudy.pojo.Collection;
import com.wuzhiming.istudy.pojo.Comment;
import com.wuzhiming.istudy.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName: CollectionMapper
 * @Description: 用户收藏mapper
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/3/16 19:01
 */
@Mapper
public interface CollectionMapper {
    /**
    * @Description: 用户收藏课程
    * @Param: [id]
    * @return: com.wuzhiming.istudy.pojo.User
    * @Author: zhimingw
    * @Date: 2022/3/16
    */
    int addCollection(Collection collection);
    
    /**
    * @Description: 取消收藏课程
    * @Param: [collection]
    * @return: int
    * @Author: zhimingw
    * @Date: 2022/3/24
    */
    int cancleCollection(Collection collection);
    
    /**
    * @Description: 查询用户是否收藏过该课程
    * @Param: [userId, courseId]
    * @return: int
    * @Author: zhimingw
    * @Date: 2022/3/24
    */
    List<Collection> getCollection(Collection collection);
}
